package ymjy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.List;

/**
 * @author DengZhiYuan
 * @version 1.0
 * @date 2022/3/16 11:22
 */
public class QuickSql {

    public static void main(String[] args) {
        System.out.println(new Date(1647423563135L));
//        new QuickSql().comboType();
    }

    private void comboType(){
        List<String[]> all = Arrays.asList(new String[]{"110017","基因检测类"},new String[]{"110018","癌筛检测类"}
                ,new String[]{"110019","无创检测类"},new String[]{"110020","指尖血检测类"}
                ,new String[]{"110021","快速检测类"},new String[]{"110022","猝及防检测类"}
                ,new String[]{"110023","康养类"},new String[]{"110024","细胞存储类"}
                ,new String[]{"110025","传统医疗类"},new String[]{"110026","PETMR类"}
                ,new String[]{"110027","全癌清0检测类"},new String[]{"110028","上门核酸类"}
        );

        String sql = "INSERT INTO \"SYS_DICTTYPE\"(\"ID\", \"DICTID\", \"DICTCODE\", \"DICTNAME\", \"DICTREMARK\", \"PARENTDICTID\"," +
                " \"SYSTYPE\", \"LEAF\", \"DICT_ORDER\", \"QUICK_ID\")\n" +
                "VALUES ('%s', '2%s', '2%s', '%s', NULL, '100003', '2', '1', NULL, '%s');";

        List<String> allSql = new ArrayList<>();
        Integer val = 399;
        for (int i = 0; i < all.size(); i++) {
            String[] array = all.get(i);
            val = val +1;
            allSql.add(String.format(sql,val,array[0],array[0],array[1],array[0]));
        }
        allSql.forEach(e->{
            System.out.println(e);
        });
    }

}
